import os
base_dir = os.path.dirname(__file__)
class Config:
    SQLALCHEMY_COMMIT_ON_TEARDOWN = True
    SQLALCHEMY_TRACK_MODIFICATIONS= False
#开发环境
class DevelopConfig:
    SQLALCHEMY_DATABASE_URI = "sqlite:///"+os.path.join(base_dir, "inter-dev.sqlite")

#测试环境
class TestingConfig:
    SQLALCHEMY_DATABASE_URI = "sqlite:///" + os.path.join(base_dir, "inter-test.sqlite")

#生产环境配置
class ProductConfig:
    SQLALCHEMY_DATABASE_URI = "sqlite:///" + os.path.join(base_dir, "inter.sqlite")

#可以随意切换上面三个环境
config= {
    "develop":DevelopConfig,
    "testng":TestingConfig,
    "product":ProductConfig,
    "default":DevelopConfig,

}


